using Microsoft.Extensions.Logging;
using SpeedOctopusNet.Service.Transmission;

namespace SpeedOctopusNet.CommunicationServer.Transmission;

public class TransmissionService : MqttClientHostedService
{
    private readonly ILogger<TransmissionService> _logger;

    public const string TOPIC_GET_CLIENTS = "get-clients";
    public const string TOPIC_CLOSE_CLIENT = "close-client";

    /// <summary>
    /// 远程控制
    /// </summary>
    public const string TOPIC_REMOTE_CTRL = "remote-ctrl";

    /// <summary>
    /// 重新载入数采仪
    /// </summary>
    public const string TOPIC_RELOAD_DAU = "reload-dau";

    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="logger">logger</param>
    /// <param name="onlineClientInfo">在线客户端信息</param>
    /// <param name="messageProxy">消息代理程序</param>
    /// <param name="clientParams">客户端参数</param>
    public TransmissionService(ILogger<TransmissionService> logger)
        : base(logger)
    {
        _logger = logger;
    }

    protected override void SubscribeTopics()
    {
        // ...
    }
}
